﻿using FanaticRock.Core.AudioPlay.Events;
using FanaticRock.Core.Enums;
using FanaticRock.Core.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FanaticRock.Core.ServiceInterfaces
{
    public interface IPlayListService
    {
        IReadOnlyList<Song> PlayList { get; }

        event EventHandler<PlayListChangedEventArgs> PlayListChanged;

        event EventHandler<AudioPlayedEventArgs> AudioPlayed;

        PlayModeEnum PlayModeEnum { get; }

        Task AddSong(Song song);
        Task AddSongRange(IEnumerable<Song> songs);
        Task Clear();
        Task<Song> GetSongById(string id);
        Task Remove(string id);
        Task SetPlayList(IEnumerable<Song> newList);

        Task Play(string id);

        Task Play(Song song);

        Task Play();

        Task Pause();

        Task SetPlayModeEnum(PlayModeEnum playModeEnum);

        Task PlayNext();

        Task PlayPreview();

        Task Replay();

        ///<summary>保存当前的播放列表。</summary>
        Task SaveList(bool forced);
    }
}
